/**
 * f-club.cn
 * Copyright (c) 2009-2012 All Rights Reserved.
 */
package com.mtoolkit.socket;

import java.io.Serializable;
import java.net.InetAddress;
import java.net.SocketException;

/**
 * Socket request.
 * 
 * @author michael
 * @version $Id: SocketRequest.java 70 2012-10-29 10:12:09Z xishizhang@gmail.com $
 */
public class SocketRequest implements Serializable {
	
    /** serial version UID */
    private static final long serialVersionUID = -3417693387247194317L;
    
    private String _requestId;
	private Object _message;
	
    public SocketRequest(String requestId) {
        if (requestId == null) {
            throw new NullPointerException("requestId");
        }
        _requestId = requestId;
    }
	
    public String getRequestId() {
        return _requestId;
    }
    
	public Object getRequestData() {
	    return _message;
	}
	
	public void setRequestData(Object message) {
		_message = message;
	}
	
    public InetAddress getInetAddress() {
    	return null;
    }

    public int getPort() {
    	return -1;
    }
    
    public boolean isConnected() {
    	return false;
    }

    public boolean isConnectionPending() {
    	return false;
    }

    public boolean getKeepAlive() throws SocketException {
    	return false;
    }

    public int getSoTimeout() throws SocketException {
    	return -1;
    }

    public boolean getTcpNoDelay() throws SocketException {
    	return false;
    }

    public boolean isClosed() {
    	return false;
    }
    
}
